import React from 'react';
import { connect } from 'react-redux';
import { BROWSER_MODE } from 'Constants/webConstants';
import './index.scss';

class PlateTitle extends React.PureComponent {
  render() {
    const { mode } = this.props;
    const isVertical = BROWSER_MODE.isVertical(mode);
    return (
      <div className={`${isVertical ? 'v-' : ''}plate-title`}>
        <p className="plate-p"><span className="plate-text">{this.props.text || '标题'}</span></p>
        <span className="plate-triangle">{}</span>
        <span className="plate-parallelogram">{}</span>
        <span className="plate-parallelogram">{}</span>
        <span className="plate-parallelogram">{}</span>
      </div>
    );
  }
}
function mapStateToProps(state) {
  return {
    ...state.webReducer
  };
}

export default connect(mapStateToProps)(PlateTitle);
